package de.gebauer.xbmc.utils;

import java.io.File;

public class FileUtils {

	public static boolean deleteRecursively(File newAddonDir) {
		boolean success = true;
		final File[] listFiles = newAddonDir.listFiles();
		for (File file : listFiles) {
			if (file.isDirectory()) {
				success = success && deleteRecursively(file);
			} else {
				success = success && file.delete();
			}
		}
		newAddonDir.delete();
		return success;
	}
}
